package com.lekang.service.impl;

import java.util.List;
import com.lekang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lekang.mapper.AbilityAssessmentMapper;
import com.lekang.domain.AbilityAssessment;
import com.lekang.service.IAbilityAssessmentService;

/**
 * 能力评估Service业务层处理
 * 
 * @author wjy
 * @date 2025-10-15
 */
@Service
public class AbilityAssessmentServiceImpl implements IAbilityAssessmentService 
{
    @Autowired
    private AbilityAssessmentMapper abilityAssessmentMapper;

    /**
     * 查询能力评估
     * 
     * @param id 能力评估主键
     * @return 能力评估
     */
    @Override
    public AbilityAssessment selectAbilityAssessmentById(Long id)
    {
        return abilityAssessmentMapper.selectAbilityAssessmentById(id);
    }

    /**
     * 查询能力评估列表
     * 
     * @param abilityAssessment 能力评估
     * @return 能力评估
     */
    @Override
    public List<AbilityAssessment> selectAbilityAssessmentList(AbilityAssessment abilityAssessment)
    {
        return abilityAssessmentMapper.selectAbilityAssessmentList(abilityAssessment);
    }

    /**
     * 新增能力评估
     * 
     * @param abilityAssessment 能力评估
     * @return 结果
     */
    @Override
    public int insertAbilityAssessment(AbilityAssessment abilityAssessment)
    {
        abilityAssessment.setCreateTime(DateUtils.getNowDate());
        return abilityAssessmentMapper.insertAbilityAssessment(abilityAssessment);
    }

    /**
     * 修改能力评估
     * 
     * @param abilityAssessment 能力评估
     * @return 结果
     */
    @Override
    public int updateAbilityAssessment(AbilityAssessment abilityAssessment)
    {
        abilityAssessment.setUpdateTime(DateUtils.getNowDate());
        return abilityAssessmentMapper.updateAbilityAssessment(abilityAssessment);
    }

    /**
     * 批量删除能力评估
     * 
     * @param ids 需要删除的能力评估主键
     * @return 结果
     */
    @Override
    public int deleteAbilityAssessmentByIds(Long[] ids)
    {
        return abilityAssessmentMapper.deleteAbilityAssessmentByIds(ids);
    }

    /**
     * 删除能力评估信息
     * 
     * @param id 能力评估主键
     * @return 结果
     */
    @Override
    public int deleteAbilityAssessmentById(Long id)
    {
        return abilityAssessmentMapper.deleteAbilityAssessmentById(id);
    }
}
